//
//  DXCompseBtn.swift
//  weiBoOfSwift
//
//  Created by simon on 15/12/13.
//  Copyright © 2015年 simon. All rights reserved.
//

import UIKit

class DXCompseBtn: UIButton {

    override init(frame: CGRect) {
        super.init(frame: frame)
//        backgroundColor =  UIColor.redColor()
        
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
       
    }
    override var highlighted:Bool{
        get{
        return false
        }
        set{
        
        }
    }
//    重新定义值控件的位子
    override func layoutSubviews() {
        super.layoutSubviews()
      imageView?.x = 3
      imageView?.y = 0
     
      titleLabel?.y = CGRectGetMaxY(imageView!.frame) + 8
      titleLabel?.x = imageView!.x
      titleLabel?.width = imageView!.width
      titleLabel?.textAlignment = .Center
        
 }
}
